package com.garen.sys.biz.impl;

import com.garen.sys.dao.IFireApkDao;
import com.garen.sys.entity.FireApk;
import com.garen.sys.biz.IFireApkBiz;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
import com.garen.common.*;


@Service
public class FireApkBizImpl implements IFireApkBiz {

	@Autowired
	private IFireApkDao fireApkDao;

	public FireApk getLastApk(FireApk fireApk){
		return fireApkDao.getLastApk(fireApk);
	}
	
	/*
	*分页查询
	*/
	@Override
	public List<FireApk> getFireApkList(PageBean<FireApk> pb,FireApk fireApk){
		return fireApkDao.getPageList(pb,fireApk);
	}

	/*
	*分页查询
	*/
	@Override
	public List<FireApk> getFireApkList(FireApk fireApk){
		return fireApkDao.getList(fireApk);
	}

	/*
	*查询个体
	*/
	@Override
	public FireApk getFireApk(FireApk fireApk){
		return fireApkDao.get(fireApk);
	}

	/*
	*保存
	*/
	@Override
	public int saveFireApk(MsgBean mbean,FireApk fireApk){
		int ret = -1;
		if(fireApk.getApkId() == null){
			ret = fireApkDao.add(fireApk);
		}else{
			ret = fireApkDao.update(fireApk);
		}
		return ret;
	}

	/*
	*删除
	*/
	@Override
	public int delFireApk(MsgBean mbean,FireApk fireApk){
		return fireApkDao.del(fireApk);
	}

}
